home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mac Magazin/MacEasy 19
/
Mac Magazin and MacEasy Magazine CD - Issue 19.iso
/
Grafik & Text & Film
/
Quark XTensions
/
Freeware Xtensions
/
XPress Scripts 1.0
/
Crop marks
/
Crop marks
next >
Wrap
Text File
|
1994-08-10
|
5KB
|
101 lines
tell application "QuarkXPress 3.3"
activate
if document 1 exists then
tell document 1
copy (count of (generic boxes whose selected is true)) to numSelected
if (box type of generic boxes whose selected is true) = line box then
beep
display dialog "Cannot put crop marks onto lines." buttons "OK" default button 1 with icon 2
do updates
else
copy (display dialog "Set crop marks:" & return & "Crop mark length in pts:" default answer "12" with icon 2000) to x
copy text returned of x as real to registrationMarkLength
do updates
copy (display dialog "Set crop marks:" & return & "Offset distance in pts:" default answer "6" with icon 2000) to y
copy text returned of y as real to offsetDist
do updates
copy tool mode to toolMode
set tool mode to drag mode
copy item spread coords to itemCoords
set item spread coords to true
copy horizontal measure to hm
copy vertical measure to vm
set horizontal measure to points
set vertical measure to points
copy selection to thatSelected
set lineWidth to 0.25
set lineColor to "Registration"
set regLength to registrationMarkLength + offsetDist
repeat with i from 1 to count of picture boxes
if selected of picture box i is true then
copy bounds of picture box i as list to x
copy item 1 of x as real to x1
copy item 2 of x as real to x2
copy item 3 of x as real to x3
copy item 4 of x as real to x4
make line box at beginning with properties ¬
{left point:{x1, x2 - regLength}, right point:{x1, x2 - offsetDist}, style:solid line, width:lineWidth, color:lineColor}
make line box at beginning with properties ¬
{left point:{x1, x4 + offsetDist}, right point:{x1, x4 + regLength}, style:solid line, width:lineWidth, color:lineColor}
make line box at beginning with properties ¬
{left point:{x3, x2 - regLength}, right point:{x3, x2 - offsetDist}, style:solid line, width:lineWidth, color:lineColor}
make line box at beginning with properties ¬
{left point:{x3, x4 + offsetDist}, right point:{x3, x4 + regLength}, style:solid line, width:lineWidth, color:lineColor}
make line box at beginning with properties ¬
{left point:{x1 - regLength, x2}, right point:{x1 - offsetDist, x2}, style:solid line, width:lineWidth, color:lineColor}
make line box at beginning with properties ¬
{left point:{x1 - regLength, x4}, right point:{x1 - offsetDist, x4}, style:solid line, width:lineWidth, color:lineColor}
make line box at beginning with properties ¬
{left point:{x3 + offsetDist, x2}, right point:{x3 + regLength, x2}, style:solid line, width:lineWidth, color:lineColor}
make line box at beginning with properties ¬
{left point:{x3 + offsetDist, x4}, right point:{x3 + regLength, x4}, style:solid line, width:lineWidth, color:lineColor}
end if
end repeat
repeat with i from 1 to count of text boxes
if selected of text box i is true then
copy bounds of text box i as list to x
copy item 1 of x as real to x1
copy item 2 of x as real to x2
copy item 3 of x as real to x3
copy item 4 of x as real to x4
make line box at beginning with properties ¬
{left point:{x1, x2 - regLength}, right point:{x1, x2 - offsetDist}, style:solid line, width:lineWidth, color:lineColor}
make line box at beginning with properties ¬
{left point:{x1, x4 + offsetDist}, right point:{x1, x4 + regLength}, style:solid line, width:lineWidth, color:lineColor}
make line box at beginning with properties ¬
{left point:{x3, x2 - regLength}, right point:{x3, x2 - offsetDist}, style:solid line, width:lineWidth, color:lineColor}
make line box at beginning with properties ¬
{left point:{x3, x4 + offsetDist}, right point:{x3, x4 + regLength}, style:solid line, width:lineWidth, color:lineColor}
make line box at beginning with properties ¬
{left point:{x1 - regLength, x2}, right point:{x1 - offsetDist, x2}, style:solid line, width:lineWidth, color:lineColor}
make line box at beginning with properties ¬
{left point:{x1 - regLength, x4}, right point:{x1 - offsetDist, x4}, style:solid line, width:lineWidth, color:lineColor}
make line box at beginning with properties ¬
{left point:{x3 + offsetDist, x2}, right point:{x3 + regLength, x2}, style:solid line, width:lineWidth, color:lineColor}
make line box at beginning with properties ¬
{left point:{x3 + offsetDist, x4}, right point:{x3 + regLength, x4}, style:solid line, width:lineWidth, color:lineColor}
end if
end repeat
set tool mode to toolMode
set item spread coords to itemCoords
set horizontal measure to hm
set vertical measure to vm
end if
end tell
else
beep
display dialog "This script requires an" & return & "open QuarkXPress document." buttons "OK" default button 1 with icon 1
do updates
end if
end tell